package com.hehua.DecoratorPattern;

/**
 * 黑色边框装饰类,充当具体装饰类
 */
public class BlackBorderDecorator extends ComponentDecorator{
    /**
     * 注入抽象构件类型的对象
     *
     * @param component
     */
    public BlackBorderDecorator(Component component) {
        super(component);
    }
    @Override
    public void display(){
        this.setBlackBorder();
        super.display();
        System.out.println();
    }
    public void setBlackBorder(){
        System.out.println("增加黑色边框");
    }
}
